package com.lnking.lnkingplace.model.dto.record.monitor;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class MonitorListDto {

    private String id;

    private String placeName;

    private String placeId;

    @ApiModelProperty(value = "姓名")
    private String name;

    @ApiModelProperty(value = "性别")
    private String sex;

    @ApiModelProperty(value = "房间号")
    private String room;

    @ApiModelProperty(value = "岗位")
    private String post;

    @ApiModelProperty(value = "测温时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime thermometryTime;

    @ApiModelProperty(value = "体温")
    private Float bodyTemperature;

    @ApiModelProperty(value = "有无症状")
    private String symptom;

    @ApiModelProperty(value = "核酸结果")
    private String result;

    @ApiModelProperty(value = "人员类型")
    private String personnelType;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "核酸检测时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime checkTime;

    @JsonIgnore
    private String strBodyTemperature;

    public String getStrBodyTemperature(){
        if(null != bodyTemperature){
            return String.valueOf(bodyTemperature);
        }
        return null;
    }
}
